<?php
include "pdo.php";
$str=file_get_contents('http://www.17k.com/man/');
$preg='#01_subscribe/man_pc.html.*01_subscribe/newBook_man_pc.html#isU';
//正则匹配
preg_match($preg,$str,$arr);
$preg_content='#<li>.*<span class=".*">(.*)</span> <a href="(.*)" .*>(.*)</a>.*</li>#isU';
preg_match_all($preg_content,$arr[0],$arr_content);
print_r($arr_content);die;
$pdo=new pdo1();
foreach($arr_content[1] as $k=>$v)
{
    $arr1['sort']=$arr_content[1][$k];
    $arr1['url']=$arr_content[2][$k];
    $arr1['name']=$arr_content[3][$k];
    $pdo->insert($arr1,'17_ktitle');
}